#{extends 'main.html' /}
#{set title:'Videos' /}

<div class="series_tab">
<div class="series_title">${series?.name}</div>
<div class="series_follow">
#{if user?.follows?.contains(series)}
	<img src="@{'/public/images/remove_icon.png'}" width="14" height="14" border="0" style="vertical-align:middle;" /> 
	<a href="/s/${series?.id}/unfollow">Unfollow</a>
#{/if}
#{else}
<img src="@{'/public/images/plus_icon.gif'}" width="14" height="14" border="0" style="vertical-align:middle;" /> 
    <a href="/s/${series?.id}/follow">Follow</a>
#{/else}
</div>
<div class="series_follow">
	<img src="@{'/public/images/facebookShareIcon.png'}" width="14" height="14" border="0" style="vertical-align:middle;" />
	<a href=""  onclick="postToFeed('${series?.name} @ TV World', 'http://54.246.83.207:9007${series?.poster}', '${user?.name} follows ${series?.name}', '${series?.name} @ TV World', 'http://apps.facebook.com/cengdoi-gg/s/${series?.id}',''); return false;">Share</a>
</div>
</div>

<div class="clear" style="height: 10px;"></div>

<div class="series_menu">
<a href="/s/${series?.id}" class="series_menu_a">Details</a> 
<a href="/s/${series?.id}/topics" class="series_menu_a">Topics</a> 
<a href="/s/${series?.id}/videos" class="series_menu_a_active">Videos</a> 
<a href="/s/${series?.id}/episodes" class="series_menu_a">Episodes</a>
</div>

<div class="clear" style="height: 20px;"></div>

<div class="series_title"> Add Video </div>
<div class="clear" ></div>

#{ifErrors}
   <p class="error">
        All fields are required!
   </p>
   <div class="clear" style="height: 10px;"></div>
#{/ifErrors}


<div class="series_tab">

#{form @Series.add_new_video(series.id)}

<div class="series_tab">
	<div class="form-left">
	Video Name:
	</div>
	
	<div class="form-right">
	<input type="text" style="border: 1px solid #59983B; width: 250px;" name="name">
	</div>
	
	<div class="form-left">
	Youtube Address:
	</div>
	
	<div class="form-right">
    <input type="text" style="border: 1px solid #59983B; width: 250px;" name="address" value="http://" onclick="this.value='';"> <br /><span style="font-weight:normal;">(ex: http://www.youtube.com/watch?v=qYNeT2nzEgA)</span>
    </div>
    
    <div class="form-right">
    <input type="submit" value="Submit Video!" style="border: 1px solid #59983B; width: 120px; height: 25px" />
    </div>
    
</div>
    
#{/form}

</div>